Option Explicit

Private aList()
Private d As Object
Private sKeys As String
Private sItems As String
Private dKeys()
Private dItems()


Function init(area As Range)
    aList = area
End Function


Function dDeDuplicationNoTitle() As Object
    Dim i As Integer
    Set d = CreateObject("Scripting.Dictionary")
    
    d(Empty) = Empty
    For i = 2 To UBound(aList, 1)
        d(aList(i, 1)) = i
    Next i
    d.Remove (Empty)
    
    dKeys = d.keys
    dItems = d.items
    sKeys = Join(d.keys, ",")
    sItems = Join(d.items, ",")

End Function


Function dDeDuplication() As Object
    Dim i As Integer
    Set d = CreateObject("Scripting.Dictionary")
    
    d(Empty) = Empty
    For i = 1 To UBound(aList, 1)
        d(aList(i, 1)) = i
    Next i
    d.Remove (Empty)
    
    dKeys = d.keys
    dItems = d.items
    sKeys = Join(d.keys, ",")
    sItems = Join(d.items, ",")

End Function


Property Get GetStrKeys() As String
    GetDicKeys = sKeys
End Property

Property Get GetStrItems() As String
    GetDicItems = sItems
End Property


Property Get GetDicKeys()
    GetDicKeys = dKeys
End Property

Property Get GetDicItems()
    GetDicItems = dItems
End Property
